<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
 <HEAD>
  <TITLE> New Document </TITLE>
  <META NAME="Generator" CONTENT="EditPlus">
  <META NAME="Author" CONTENT="">
  <META NAME="Keywords" CONTENT="">
  <META NAME="Description" CONTENT="">
 </HEAD>

 <BODY>
  <SCRIPT LANGUAGE="JavaScript">
  function daysInMonth(iMonth, iYear)
	{  
		return 32 - new Date(iYear, iMonth, 32).getDate();  
	}

alert(daysInMonth(1,2009));
  </SCRIPT>
 </BODY>
</HTML>
